package lab02.Test33;

/**
 * Created by 唐苗苗 on 2017/12/30.
 */
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.LinkedTransferQueue;
public class Test33 {

        public static void main(String[] args) {
            Scanner scanner=new Scanner (System.in);
            List<String> word=new ArrayList<String>();
            System.out.println("please input your words:");
            String s=scanner.nextLine();
            String[] a=s.split(",");
            for (int i=0;i<a.length;i++){
                for (int j=i+1;j<a.length;j++){
                    if(a[i].compareToIgnoreCase(a[j])>0){
                        s=a[i];
                        a[i]=a[j];
                        a[j]=s;
                    }
                }
            }
            for (String o:a){
                word.add(o);
                System.out.println(o);
            }
        }
    }


